#include<stdio.h>

int Find_num(int num[],int low,int high,int refer_num);
int main(void)
{
	int m,n;
	scanf("%d",&n);
	
	
	int num[n];
	for(int i=0;i<n;i++)
	{
		scanf("%d",&num[i]);
	}
	
	scanf("%d",&m);
	int find,flag;
	for(int j=0;j<m;j++)
	{
		scanf("%d",&find);
		flag=Find_num(num,0,n-1,find);
		if(flag!=-1)
		{
			printf("%d\n",flag);
		}
		else
		{
			printf("Not found!\n");
		}
	}
	
	return 0;
}
int Find_num(int num[],int low,int high,int refer_num)
{
	int middle;
	
	if(low>high)
	{
		return -1;
	}
	else
	{
		middle=(low+high)/2;
		if(refer_num==num[middle])
		{
			return middle;
		}
		else if(refer_num<num[middle])
		{
			return Find_num(num,low,middle-1,refer_num);
		}
		else
		{
			return Find_num(num,middle+1,high,refer_num);
		}
	}
}
